Hexo修补(Feed和公益404页面)

订阅

安装hexo-generator-feed

1
2
cd ~/hexo
npm install hexo-generator-feed --save

配置_config.yml

1
2
3
4
5
6
7
# Feed
feed:
type: atom
path: atom.xml
limit: 20
hub:
content:

添加公益404页面

source目录下新建404.html,内容如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8;"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="robots" content="all" />
<meta name="robots" content="index,follow"/>
</head>
<body>

<script type="text/javascript" src="http://www.qq.com/404/search_children.js"
charset="utf-8" homePageUrl="blog.zlmax.com"
homePageName="回到我的主页">
</script>

</body>
</html>

配置_config.yml,不渲染404页面

1
2
3
skip_render: # 忽略渲染列表
- "404.html"
- "plugins/**"